<template>
  <div class="ht">
    <div class="ht-left">
      <ul class="nav-list">
<!--       -->
        <li   v-show="this.$store.state.userInfo.userAdmin" :class="active=='memberManagement'?'active':''" @click="toPage('memberManagement')">成员管理</li>
<!--         -->
        <li v-show="this.$store.state.userInfo.adAdmin" :class="active=='administratorManagement'?'active':''" @click="toPage('administratorManagement')">管理员管理</li>
<!--        -->
        <li v-show="this.$store.state.userInfo.baseAdmin" :class="active=='comprehensiveSetup'?'active':''" @click="toPage('comprehensiveSetup')">综合设置</li>
<!--        -->
        <li  v-show="this.$store.state.userInfo.baseAdmin" :class="active=='enterpriseTemplate'?'active':''" @click="toPage('enterpriseTemplate')">企业模板</li>
<!--        -->
        <li  :class="active=='myTemplate'?'active':''" @click="toPage('myTemplate')">我的模板</li>
      </ul>
    </div>
    <div class="ht-right">
      <router-view/>
    </div>
  </div>
</template>

<script>
  export default {
    name: "Ht",
    data() {
      return {
        active: '',
      }
    },
    created() {
      this.active=this.$route.name;
    },
    methods: {
      toPage(type) {
        this.active=type;
        this.$router.push({path: '/ht/'+type});
      }
    },
  }
</script>

<style scoped type="text/scss" lang="scss">
  .ht {
    width: 100%;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    display: flex;

    .ht-left {
      width: 256px;
      height: 100%;
      border-radius: 6px;
      background-color: #ffffff;
      margin-right: 24px;

      .nav-list {
        padding-top: 32px;
        padding-left: 32px;

        > li {
          padding-bottom: 32px;
          font-size: 16px;
          color: #96A2AA;
          cursor: pointer;
        }

        > .active {
          color: #454A55;
          font-weight: bold;
        }
      }
    }

    .ht-right {
      width: calc(100% - 256px - 24px);
      height: 100%;
      background-color: #ffffff;
      border-radius: 6px;
    }
  }
</style>
